package com.example.administrator.yunniuusedcar.holder;

/**
 * Created by Administrator on 2018/1/2.
 */

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.example.administrator.common.ui.BaseAdapterRV;
import com.example.administrator.common.ui.BaseHolderRV;
import com.example.administrator.yunniuusedcar.R;
import com.example.administrator.yunniuusedcar.activity.ShopInfoImagerActivity;
import com.example.administrator.yunniuusedcar.model.mode_benn.RanCarXiangQingBean;
import com.squareup.picasso.Picasso;

/**  商品详情 图文详情
 * Created by Administrator on 2017/12/28.
 */

public class ShopTuWenXQHolder extends BaseHolderRV<RanCarXiangQingBean> {

    private ImageView ivTuwenPicture1;

    /**
     * 构造方法
     *
     * @param context 上下文对象
     * @param parent  指RecyclerView控件
     * @param adapter 适配器
     *                1@param layoutResId RecyclerView的一个item布局文件
     */
    public ShopTuWenXQHolder(Context context, ViewGroup parent, BaseAdapterRV<RanCarXiangQingBean> adapter) {
        super(context, parent, adapter, R.layout.fragment_tuweninfo);
    }

    @Override
    public void onFindViews(View itemView) {
        intFID();
    }

    @Override
    protected void onRefreshView(RanCarXiangQingBean bean, int position) {
        Picasso.with(context).load(bean.data.list.detail.get(position)).into(ivTuwenPicture1);
    }

    private void intFID() {

        ivTuwenPicture1 = itemView.findViewById(R.id.iv_TuwenPicture1);
    }

}